//调用接口配置文件
import { request } from 'config/request'
import config from 'config/config'
// 定义接口

//新增
export async function addFun(params) {
    return request({
        url: `${config.aheadPlan}admin/competingGoods/competingGoods/add`,
        method: 'POST',
        data: params,
    });
  };

  //编辑
export async function editFun(params) {
    return request({
        url: `${config.aheadPlan}admin/competingGoods/competingGoods/edit`,
        method: 'POST',
        data: params,
    });
  };

//查询
export async function queryInfo(params) {
    return request({
        url: `${config.aheadPlan}admin/competingGoods/competingGoods/queryById`,
        method: 'GET',
        data: params,
    });
  };

  //获取区域
export async function findProduct(params) {
  return request({
      url: `${config.aheadPlan}system/login/getProjectPermission`,
      method: 'GET',
      data: params,
  });
};

  //获取竞品名称
  export async function initQueryField(params) {
    return request({
        url: `${config.aheadPlan}admin/competingGoods/competingGoods/initQueryField`,
        method: 'GET',
        data: params,
    });
  };

   //新增竞品品牌关联
  export async function addlittle(params) {
    return request({
        url: `${config.aheadPlan}admin/attributeGroup/attributeGroup/addlittle`,
        method: 'POST',
        data: params,
    });
  };

   //查询周报信息
  export async function findByInformation(params) {
    return request({
        url: `${config.aheadPlan}admin/competitorWeekly/competitorWeekly/findByInformation`,
        method: 'GET',
        data: params,
    });
  };

  export async function uploadImage(params) {
    return request({
        url: `${config.aheadPlan}system/upload/uploadImage`,
        method: 'POST',
        data: params.file,
    });
  };

